package four.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * @JsonIgnore 可用于字段 getter setter等
 * @JsonIgnoreProperties 忽略多个字段, 和忽略json中不认识的key值
 */

@JsonIgnoreProperties( value = {"remark", "date"}, ignoreUnknown = true )
public class IgnoreBean {

    //忽略此字段
    @JsonIgnore
    private String id;

    private String remark;

    private String date;

    private String name;

    private int age;

    private String address;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "IgnoreBean{" +
                "id='" + id + '\'' +
                ", remark='" + remark + '\'' +
                ", date='" + date + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                '}';
    }
}
